package com.punch.course.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.punch.common.vo.course.classes.AppCourseClassPageVO;
import com.punch.common.vo.course.classes.AppCourseClassVO;
import com.punch.common.vo.course.classes.ClassPageVO;
import com.punch.course.model.CourseClass;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;
import java.util.Map;


/**
 * <p>
 * 课程班级表 Mapper 接口
 * </p>
 *
 * @author wjj
 * @since 2020-12-01
 */
@Mapper
public interface CourseClassMapper extends BaseMapper<CourseClass> {

    Integer queryCount(Map<String, Object> params);

    List<ClassPageVO> queryList(Map<String, Object> params);

    /**
     * app课程班级统计
     *
     * @param params 参数
     * @return int
     */
    Integer queryAppCount(Map<String, Object> params);

    /**
     * app课程班级列表
     *
     * @param params 参数
     * @return list
     */
    List<AppCourseClassPageVO> queryAppList(Map<String, Object> params);

    /**
     * app班级课程详情
     *
     * @param courseClassId 班级课程id
     * @return AppCourseClassVO
     */
    AppCourseClassVO selectAppCourseClass(Long courseClassId);

    /**
     * 报名修改班级课程的报名人数
     *
     * @param courseClassId 班级课程id
     */
    boolean updateSignUpNumberById(Long courseClassId);
}
